# -*- coding: utf8 -*-
import os
from pathlib import Path

HOST = "0.0.0.0"
PORT = 8637       #模型端口配置
TG_URL = "/api/v1/windows-plugging"    #路由配置

weights_target= './weights/10_22_all_target.pt'
weights_plugging = './weights/8_21_plugging.pt'

# 设置日志地址
PROJECT_PATH = os.path.dirname(os.path.abspath(__file__))  # 项目动态目录
parent_path = Path(PROJECT_PATH).resolve().parent # 上一级目录
BASE_LOG_PATH = os.path.join(parent_path, "logs")  # 日志根目录
INFO_LOG_PATH = os.path.join(BASE_LOG_PATH, "INFO")  # INFO日志目录
ERROR_LOG_PATH = os.path.join(BASE_LOG_PATH, "ERROR")  # ERROR日志目录
INFO_LOG_NAME = "Windows-plugging-rec-info"
ERROR_LOG_NAME = "Windows-plugging-rec-error"

for dir__ in [BASE_LOG_PATH, INFO_LOG_PATH, ERROR_LOG_PATH]:
    if not os.path.exists(dir__):
        os.makedirs(dir__, exist_ok=True)







